package dao.imp;

import dao.NewsDao;
import factory.SimpleDaoFactory;

public class NewsServiceImpl implements NewsService {
    // 所依赖的 NewsDao 对象
private NewsDao dao;
public void setDao(NewsDao dao) {
      this.dao = dao;
      }

         public void addNews(News news) {
         // 调用 NewsDao 的方法保存新闻信息
         dao.save(news);
         }
}
